package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.model.PreSaleRemind;
import com.ygqh.baby.po.BiSkuSale;
import com.ygqh.baby.po.WdtQybOrderDetail;
import com.ygqh.baby.po.WdtQybOrderDetailExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface WdtQybOrderDetailMapper {
    int countByExample(WdtQybOrderDetailExample example);

    int deleteByExample(WdtQybOrderDetailExample example);

    int deleteByPrimaryKey(Integer recId);

    int insert(WdtQybOrderDetail record);

    int insertSelective(WdtQybOrderDetail record);

    List<WdtQybOrderDetail> selectByExample(WdtQybOrderDetailExample example);

    WdtQybOrderDetail selectByPrimaryKey(Integer recId);

    int updateByExampleSelective(@Param("record") WdtQybOrderDetail record,
                                 @Param("example") WdtQybOrderDetailExample example);

    int updateByExample(@Param("record") WdtQybOrderDetail record, @Param("example") WdtQybOrderDetailExample example);

    int updateByPrimaryKeySelective(WdtQybOrderDetail record);

    int updateByPrimaryKey(WdtQybOrderDetail record);

    int insertBatch(@Param("detailList") List<WdtQybOrderDetail> detailList);

    int updateDetailBatch(@Param("detailList") List<WdtQybOrderDetail> detailList);

    List<PreSaleRemind> selectSaleCountBySku(@Param("skuList") List<String> skuList);

    List<BiSkuSale> statisticalSkuSaleCount(@Param("queryInfo") QueryInfo queryInfo,
                                            @Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("shopNo") String shopNo,
                                            @Param("productCode") String productCode);

    List<WdtQybOrderDetail> selectDetailListAfterId(@Param("startId") Long startId, @Param("excludeShopNo") String... excludeShopNo);

    List<WdtQybOrderDetail> selectDetailListByTime(@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("shopNo") String... shopNo);
}